package com.sxsy.datasource.controller;

import com.sxsy.datasource.util.HqjcFileUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Controller;

import java.io.IOException;

@EnableScheduling

@Controller
public class HqjcFileController {
    @Autowired
    private HqjcFileUtil hqjcFileUtil;
    //5分钟
    //@Scheduled(cron="0 0/1 * * * ?")//每隔一分钟执行一次
    @Scheduled(cron="0/4 * * * * ?") // 每隔4秒钟执行一次任务
    public void Dataupdate(){

        try{
            hqjcFileUtil.RtfileAnalysis();
        }catch (Exception e){
            return;
        }

    }

}
